1. Field
One or more embodiments within the following description relates to a file access method and system, and more particularly, to an access method and system capable of increasing a search speed for file access while retaining compatibility with file systems using cluster chains.
2. Description of the Related Art
In general, operating systems (OSs) may use a file system to manage data within a file access system where it is installed. The file system may be a logical structure that is typically constructed primarily to manage files. For example, in a Microsoft Windows series of software operating systems, a format command may be used to organize and initialize the file system. After the file system is made, a user enables storing or deleting of files. Types of file systems are classified variously according to the operating system (OS). The example Microsoft Windows series of operating systems use file systems such as a File Allocation Table (FAT) and New Technology File System (NTFS). In another example, a series of Unix/Linux operating systems use file systems such as Unix File System (UFS), Extended 2 (EXT2), Extended 3 (EXT3), and Journaling File system (JFS). Some of the above-described file systems may provide various additional functions such as data coding, data compression, and the like.
Conventional file systems used to store and manage files are roughly classified into two data space categories, a data space in which actual data of a file is stored, and an information space in which control information associated with the file is stored. Attribute, right/permissions, name, and location information of a file is stored in the information space. The information space may include a File Allocation Table (FAT) area indicating file attribute. The FAT space is data that is used to manage a cluster, the cluster being a defined access unit for data spaces. The cluster, for example, is a logical unit that is organized to manage a plurality of sectors, in one block unit. If a format operation is executed by use of a format program in an operating system of the example Microsoft Windows series of operating systems, in general, one cluster is set to have a size of 4 Kbyte. Thus, since a sector has a size of 512 Byte, here, one cluster is formed of eight sectors. It is possible to reduce the amount of data that is needed to manage files, by managing sectors according to such a cluster block unit. In a file system, the FAT space may contain status values of clusters for configuring one or more files. That is, the FAT space includes FAT entries. Locations in files or a data space of a directory by FAT entries may be expressed by linked lists. Each of the FAT entries contains a number indicating the next cluster. If one cluster is searched in this manner, the next cluster may be accessed by acquiring the stored location information. In order to sequentially access a cluster chain, a processing unit such as a central processing unit (CPU) may read a shared cluster number of a next cluster constituting a chain to obtain allocation information of each cluster from a FAT entry. And then, the processing unit may confirm whether a current cluster accessed is a last cluster of a cluster chain constituting a file. That is, whenever the processing unit recognizes each FAT entry, it may judge whether the recognized cluster is an End Of Cluster (EOC). If not, the file system may access the next cluster linked with the current cluster with reference to linked information of the respective FAT entry. If the recognized cluster is judged to be EOC, the file system may then perform a read or write operation with respect to another file that is access requested, for example.
As described above, a file system using a cluster chain does not support continuous allocation information of clusters. That is, allocation information of a cluster chain is based upon a cluster status value of a FAT entry corresponding to each cluster. Thus, existing file systems may search all FAT entries regardless of any continuation of clusters in order to search for the end of the respective file. In the case where a has a large content, such as a moving picture or voice source data, the load on a processing unit and the resultant physical input/output time of the corresponding storage device may be increased remarkably compared to smaller files with fewer clusters, for example, due to read and comparison operations for searching all FAT entries. In order to read a chain having hundreds of continuous clusters, read and comparison operations for each FAT entry are repeated hundreds of times. Read and comparison operations for one FAT entry accompany a branch instruction in a processing unit such as an ARM processor. The branch instruction interrupts normal flow of a pipeline, so performance of a processing unit is further lowered. In other words, in the case of a file system using cluster chains, read and comparison operations of FAT entries result in the lowering of a corresponding system's performance. Thus, in case of all systems adopting a file system using a cluster chain, there is a need to reduce the physical input/output number of storage devices and reduce the number of access operations to a FAT entry corresponding to a branch instruction.